Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix I2C stop condition when receiving 1 byte with USCI #226

Merged
merged 1 commit into from Apr 29, 2013
Merged

Fix I2C stop condition when receiving 1 byte with USCI #226

merged 1 commit into from Apr 29, 2013

Conversation

astuder
Copy link

@astuder astuder commented Apr 14, 2013

According to MSP430x2xxx family guide, page 473:

If a master wants to receive a single byte only, the UCTXSTP bit must be
set while the byte is being received. For this case, the UCTXSTT may be
polled to determine when it is cleared:

    BIS.B #UCTXSTT,&UCBOCTL1 ;Transmit START cond.
POLL_STT BIT.B #UCTXSTT,&UCBOCTL1 ;Poll UCTXSTT bit
    JC POLL_STT              ;When cleared,
    BIS.B #UCTXSTP,&UCB0CTL1 ;transmit STOP cond.

Thread on 43oh: http://forum.43oh.com/topic/3154-i2c-issues/

According to MSP430x2xxx family guide, page 473:

If a master wants to receive a single byte only, the UCTXSTP bit must be
set while the byte is being received. For this case, the UCTXSTT may be
polled to determine when it is cleared:

BIS.B #UCTXSTT,&UCBOCTL1 ;Transmit START cond.
POLL_STT BIT.B #UCTXSTT,&UCBOCTL1 ;Poll UCTXSTT bit
JC POLL_STT              ;When cleared,
BIS.B #UCTXSTP,&UCB0CTL1 ;transmit STOP cond.

Thread on 43oh: http://forum.43oh.com/topic/3154-i2c-issues/
robertinant added a commit that referenced this pull request Apr 29, 2013
Fix I2C stop condition when receiving 1 byte with USCI
@robertinant robertinant merged commit 8372767 into energia:master Apr 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants